<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <script src="./promise.js"></script>
  <script>
    new Promise((resolve, reject) => {
      setTimeout(() => {
        resolve(1) // 如果发现内部有保存的成功回调 => 将其立即放入任务队列中, 而不是立即执行
        console.log('resolve之后')
      }, 1000);
    }).then(
      value => {
        console.log('onResolved1', value)
      },
      reason => {
        console.log('onRejected1', reason)
      }
    )
  </script>
</body>
</html>